package com.dk.logc.kafka.base;

import lombok.Data;

import java.util.Date;

@Data
public class BaseGlobalFlog extends BaseFlog {

    public BaseGlobalFlog() {
        super();
    }
    protected String channelId;//渠道标识
    protected Integer serverNo;//服务器ID
    protected Date createTime;//产生本则日志消息时的时间
    public BaseGlobalFlog(BaseGlobalFlog baseGlobalFlog) {
        this.channelId = baseGlobalFlog.channelId;
        this.serverNo = baseGlobalFlog.serverNo;
        this.createTime = new Date();
    }


    public static BaseGlobalFlog newBaseGlobalFlog(String channelId, Integer serverNo) {
        BaseGlobalFlog flog = new BaseGlobalFlog();
        flog.channelId = channelId;
        flog.serverNo = serverNo;
        flog.createTime = new Date();
        return flog;
    }

    @Override
    public String getCategory() {
        return "";
    }
}
